package com.wx.chapter19.writer_;

import java.io.FileWriter;
import java.io.IOException;

/**
 * @Author : 佩萁
 * Description :
 * @Create : 2023/8/29 - 22:18
 */
public class FileWriter_ {
    public static void main(String[] args) {
        String filePath = "e:\\note.txt";
        FileWriter fileWriter = null;
        char[] chars = {'a', 'b', 'c'};
        try {
            fileWriter = new FileWriter(filePath);
//            fileWriter.write('H');
//            fileWriter.write(chars);
//            fileWriter.write("韩顺平教育".toCharArray(),0,2);
//            fileWriter.write(" 你好");

        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                fileWriter.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
